home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Unix / Shells / tcsh / Source / tw.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-21  |  3.3 KB  |  100 lines

  1. /* $Header: /u/christos/src/tcsh-6.03/RCS/tw.h,v 3.12 1992/10/10 18:17:34 christos Exp $ */
  2. /*
  3.  * tw.h: TwENEX functions headers
  4.  */
  5. /*-
  6.  * Copyright (c) 1980, 1991 The Regents of the University of California.
  7.  * All rights reserved.
  8.  *
  9.  * Redistribution and use in source and binary forms, with or without
  10.  * modification, are permitted provided that the following conditions
  11.  * are met:
  12.  * 1. Redistributions of source code must retain the above copyright
  13.  *    notice, this list of conditions and the following disclaimer.
  14.  * 2. Redistributions in binary form must reproduce the above copyright
  15.  *    notice, this list of conditions and the following disclaimer in the
  16.  *    documentation and/or other materials provided with the distribution.
  17.  * 3. All advertising materials mentioning features or use of this software
  18.  *    must display the following acknowledgement:
  19.  *    This product includes software developed by the University of
  20.  *    California, Berkeley and its contributors.
  21.  * 4. Neither the name of the University nor the names of its contributors
  22.  *    may be used to endorse or promote products derived from this software
  23.  *    without specific prior written permission.
  24.  *
  25.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  26.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  27.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  28.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  29.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  30.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  31.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  32.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  33.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  34.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  35.  * SUCH DAMAGE.
  36.  */
  37. #ifndef _h_tw
  38. #define _h_tw
  39.  
  40. #define TW_ZERO        -1
  41. #define TW_NONE        0
  42. #define TW_COMMAND    1
  43. #define TW_VARIABLE    2
  44. #define TW_LOGNAME    3
  45. #define TW_FILE        4
  46. #define TW_DIRECTORY    5
  47. #define TW_VARLIST    6
  48. #define TW_USER        7
  49. #define TW_COMPLETION    8
  50. #define TW_ALIAS    9
  51. #define TW_SHELLVAR    10
  52. #define TW_ENVVAR    11
  53. #define TW_BINDING    12
  54. #define TW_WORDLIST    13
  55. #define TW_LIMIT    14
  56. #define TW_SIGNAL    15
  57. #define TW_JOB        16
  58. #define TW_EXPLAIN    17
  59. #define TW_PATHNAME    18
  60. #define TW_TEXT        19
  61.  
  62. #define TW_EXEC_CHK    0x01
  63. #define TW_DIR_CHK    0x02
  64. #define TW_TEXT_CHK    0x04
  65.  
  66. #define TW_DIR_OK    0x10
  67. #define TW_PAT_OK    0x20
  68. #define TW_IGN_OK    0x40
  69.  
  70. #ifndef TRUE
  71. # define TRUE        1
  72. #endif
  73. #ifndef FALSE
  74. # define FALSE        0
  75. #endif
  76. #define ON        1
  77. #define OFF        0
  78. #define FILSIZ        512    /* Max reasonable file name length */
  79. #define ESC        '\033'
  80. #define equal(a, b)    (strcmp(a, b) == 0)
  81.  
  82. #define is_set(var)    adrof(var)
  83. #define ismetahash(a)    (ismeta(a) && (a) != '#')
  84.  
  85. #define SEARCHLIST "HPATH"    /* Env. param for helpfile searchlist */
  86. #define DEFAULTLIST ":/usr/man/cat1:/usr/man/cat8:/usr/man/cat6:/usr/local/man/cat1:/usr/local/man/cat8:/usr/local/man/cat6"    /* if no HPATH */
  87.  
  88. extern Char PromptBuf[];
  89.  
  90. typedef enum {
  91.     LIST, LIST_ALL, RECOGNIZE, RECOGNIZE_ALL, PRINT_HELP, 
  92.     SPELL, GLOB, GLOB_EXPAND, VARS_EXPAND, PATH_NORMALIZE
  93. } COMMAND;
  94.  
  95. extern int non_unique_match;
  96.  
  97. #include "tw.decls.h"
  98.  
  99. #endif /* _h_tw */
  100.